package com.heima.kafka.spring.listener;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class MyListener {

    @KafkaListener(topics = "topicB")
    public void onMessage(ConsumerRecord consumerRecord){
        System.out.println(consumerRecord.key()+"====>"+consumerRecord.value());
    }
}
